home *** CD-ROM | disk | FTP | other *** search
/ Magnum One / Magnum One (Mid-American Digital) (Disc Manufacturing).iso / d12 / tchk21.arc / INCLUDE.ARC / FILEHK.H < prev    next >
C/C++ Source or Header  |  1989-06-20  |  2KB  |  40 lines

  1. /* TCHK 2.1 - Howard Kapustein's Turbo C library        6-6-89      */
  2. /* Copyright (C) 1988,1989 Howard Kapustein.  All rights reserved.  */
  3.  
  4. /* filehk.h  -  header file for file routines */
  5.  
  6. #ifndef FILEHK_HEADER
  7. #define FILEHK_HEADER   1
  8.  
  9. #include <howard.h>
  10.  
  11. typedef struct filespec {
  12.             char drive;
  13.             char path[81];             /* all strings     */
  14.             char filename[13];         /* are ASCIIZ      */
  15.         };
  16.  
  17. typedef struct fnameext {
  18.             char filename[9];
  19.             char ext[4];
  20.         };
  21.  
  22. #define FNAMESIZE       96      /* [d:][80 char path][filename].[ext] */
  23. #define PATHSIZE        100     /* used for making variables to manipulate path stuff */
  24. #define MAXFNAME        13      /* filename.ext w/null terminator */
  25.  
  26. /* function prototypes */
  27. int getfname(byte row, byte col, char *returnstr, char *pattern,
  28.              int argn, int argk[],char flags);  /* get a filename.ext */
  29. int set_handles(int handles);               /* set handle count (DOS 3.3) */
  30. int fname_match(char *fname1, char *fname2);/* compare filename with wildcards *,? */
  31. boolean isdir(char *fspec);                 /* is fspec a subdirectory */
  32. struct filespec *parsefilename(char *fspec);/* break fspec into d: path filename ext */
  33. int fncmp(char *fname1, char *fname2);      /* compare filename 1 w/filename 2 */
  34. struct fnameext *parsefnameext(char *filename); /* break filename.ext into filename & ext */
  35. char *expandfilespec(char *filespec, char *dest);   /* expand filespec into full d:\path\filename.ext w/wildcards */
  36. char *getfilespec(char *s);                 /* fix file specs for proper dir searching */
  37. boolean fileexist(char *filename);          /* does filename exist */
  38.  
  39. #endif              /* FILEHK_HEADER */
  40.